<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../../assets/libs/jquery/jquery-3.6.1.min.js"></script>
</head>

<body>
  <div>
    <div class="elder"></div>
    <div class="origin"></div>
    <div class="younger"></div>
  </div>

  <script>
    // 兄弟节点
    let jElem = $('.origin').siblings('div')
    console.log(jElem)

    // 兄节点
    jElem = $('.origin').prevAll('div')
    console.log(jElem)

    // 弟节点
    jElem = $('.origin').nextAll('div')
    console.log(jElem)
  </script>
</body>

</html>